<template>
	<view class="classLayout pageBg">
		<!-- 标头 -->
		<custom-nav-bar title="分类"></custom-nav-bar>
		<!-- 和主页一样使用小组件显示所有小说分类 -->
		<view class="classify">
			<theme-item v-for="item in classifyList" 
			:key="item.tagId"
			:item="item"
			></theme-item>
		</view>	
	</view>
</template>

<script setup>
import { ref } from 'vue';
import {apiGetClassify} from "@/api/apis.js"
const classifyList = ref([]);

const getClassify =async()=>{
	let res =await apiGetClassify({
		showAllTags:true
	});
	classifyList.value = res.data
}

getClassify();
</script>

<style lang="scss" scoped>
.classify{
	padding:30rpx;
	display: grid;
	grid-template-columns: repeat(3,1fr);
	gap:15rpx;
}
</style>
